package com.indexingsystem.boss.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * dh_contract
 * @author 
 */
public class Contract implements Serializable {
    private String contractId;

    /**
     * 合同编号
     */
    private String contractNo;

    private String contractName;

    /**
     * 合同金额
     */
    private String contractAmount;

    private String contractValidity;

    /**
     * 0：临时合同 1：正式合同 2：已终止 3：已取消
     */
    private Integer contractBackStatus;

    /**
     * 合同规定回款进度
     */
    private String contractBackSchedule;

    /**
     * 甲方机构id
     */
    private String jfInstitutionId;

    /**
     * 甲方机构名称
     */
    private String jfInstitutionName;

    /**
     * 甲方经手人
     */
    private String jfUserId;

    /**
     * 乙方机构id
     */
    private String yfInstitutionId;

    /**
     * 乙方机构名称
     */
    private String yfInstitutionName;

    /**
     * 乙方机构名称
     */
    private String yfUserId;

    private Date createDate;

    private String contractScansFileUrl;

    private Date updateDate;

    private String remarks;

    private String consigneeName;

    private String consigneeEmail;

    private String consigneePhone;

    private String receiptPostCode;

    /**
     * 联系地址
     */
    private String receiptAddress;
    
	private Integer				contractType;				// 合同类型
	
	private String				contractBackTax;			// 回款税后

    private static final long serialVersionUID = 1L;

    public String getContractId() {
        return contractId;
    }

    public void setContractId(String contractId) {
        this.contractId = contractId;
    }

    public String getContractNo() {
        return contractNo;
    }

    public void setContractNo(String contractNo) {
        this.contractNo = contractNo;
    }

    public String getContractName() {
        return contractName;
    }

    public void setContractName(String contractName) {
        this.contractName = contractName;
    }

    public String getContractAmount() {
        return contractAmount;
    }

    public void setContractAmount(String contractAmount) {
        this.contractAmount = contractAmount;
    }

    public String getContractValidity() {
        return contractValidity;
    }

    public void setContractValidity(String contractValidity) {
        this.contractValidity = contractValidity;
    }

    public Integer getContractBackStatus() {
        return contractBackStatus;
    }

    public void setContractBackStatus(Integer contractBackStatus) {
        this.contractBackStatus = contractBackStatus;
    }

    public String getContractBackSchedule() {
        return contractBackSchedule;
    }

    public void setContractBackSchedule(String contractBackSchedule) {
        this.contractBackSchedule = contractBackSchedule;
    }

    public String getJfInstitutionId() {
        return jfInstitutionId;
    }

    public void setJfInstitutionId(String jfInstitutionId) {
        this.jfInstitutionId = jfInstitutionId;
    }

    public String getJfInstitutionName() {
        return jfInstitutionName;
    }

    public void setJfInstitutionName(String jfInstitutionName) {
        this.jfInstitutionName = jfInstitutionName;
    }

    public String getJfUserId() {
        return jfUserId;
    }

    public void setJfUserId(String jfUserId) {
        this.jfUserId = jfUserId;
    }

    public String getYfInstitutionId() {
        return yfInstitutionId;
    }

    public void setYfInstitutionId(String yfInstitutionId) {
        this.yfInstitutionId = yfInstitutionId;
    }

    public String getYfInstitutionName() {
        return yfInstitutionName;
    }

    public void setYfInstitutionName(String yfInstitutionName) {
        this.yfInstitutionName = yfInstitutionName;
    }

    public String getYfUserId() {
        return yfUserId;
    }

    public void setYfUserId(String yfUserId) {
        this.yfUserId = yfUserId;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getContractScansFileUrl() {
        return contractScansFileUrl;
    }

    public void setContractScansFileUrl(String contractScansFileUrl) {
        this.contractScansFileUrl = contractScansFileUrl;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getConsigneeName() {
        return consigneeName;
    }

    public void setConsigneeName(String consigneeName) {
        this.consigneeName = consigneeName;
    }

    public String getConsigneeEmail() {
        return consigneeEmail;
    }

    public void setConsigneeEmail(String consigneeEmail) {
        this.consigneeEmail = consigneeEmail;
    }

    public String getConsigneePhone() {
        return consigneePhone;
    }

    public void setConsigneePhone(String consigneePhone) {
        this.consigneePhone = consigneePhone;
    }

    public String getReceiptPostCode() {
        return receiptPostCode;
    }

    public void setReceiptPostCode(String receiptPostCode) {
        this.receiptPostCode = receiptPostCode;
    }

    public String getReceiptAddress() {
        return receiptAddress;
    }

    public void setReceiptAddress(String receiptAddress) {
        this.receiptAddress = receiptAddress;
    }

    public Integer getContractType() {
		return contractType;
	}

	public void setContractType(Integer contractType) {
		this.contractType = contractType;
	}

	public String getContractBackTax() {
		return contractBackTax;
	}

	public void setContractBackTax(String contractBackTax) {
		this.contractBackTax = contractBackTax;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((consigneeEmail == null) ? 0 : consigneeEmail.hashCode());
		result = prime * result + ((consigneeName == null) ? 0 : consigneeName.hashCode());
		result = prime * result + ((consigneePhone == null) ? 0 : consigneePhone.hashCode());
		result = prime * result + ((contractAmount == null) ? 0 : contractAmount.hashCode());
		result = prime * result + ((contractBackSchedule == null) ? 0 : contractBackSchedule.hashCode());
		result = prime * result + ((contractBackStatus == null) ? 0 : contractBackStatus.hashCode());
		result = prime * result + ((contractBackTax == null) ? 0 : contractBackTax.hashCode());
		result = prime * result + ((contractId == null) ? 0 : contractId.hashCode());
		result = prime * result + ((contractName == null) ? 0 : contractName.hashCode());
		result = prime * result + ((contractNo == null) ? 0 : contractNo.hashCode());
		result = prime * result + ((contractScansFileUrl == null) ? 0 : contractScansFileUrl.hashCode());
		result = prime * result + ((contractType == null) ? 0 : contractType.hashCode());
		result = prime * result + ((contractValidity == null) ? 0 : contractValidity.hashCode());
		result = prime * result + ((createDate == null) ? 0 : createDate.hashCode());
		result = prime * result + ((jfInstitutionId == null) ? 0 : jfInstitutionId.hashCode());
		result = prime * result + ((jfInstitutionName == null) ? 0 : jfInstitutionName.hashCode());
		result = prime * result + ((jfUserId == null) ? 0 : jfUserId.hashCode());
		result = prime * result + ((receiptAddress == null) ? 0 : receiptAddress.hashCode());
		result = prime * result + ((receiptPostCode == null) ? 0 : receiptPostCode.hashCode());
		result = prime * result + ((remarks == null) ? 0 : remarks.hashCode());
		result = prime * result + ((updateDate == null) ? 0 : updateDate.hashCode());
		result = prime * result + ((yfInstitutionId == null) ? 0 : yfInstitutionId.hashCode());
		result = prime * result + ((yfInstitutionName == null) ? 0 : yfInstitutionName.hashCode());
		result = prime * result + ((yfUserId == null) ? 0 : yfUserId.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Contract other = (Contract) obj;
		if (consigneeEmail == null) {
			if (other.consigneeEmail != null)
				return false;
		} else if (!consigneeEmail.equals( other.consigneeEmail ))
			return false;
		if (consigneeName == null) {
			if (other.consigneeName != null)
				return false;
		} else if (!consigneeName.equals( other.consigneeName ))
			return false;
		if (consigneePhone == null) {
			if (other.consigneePhone != null)
				return false;
		} else if (!consigneePhone.equals( other.consigneePhone ))
			return false;
		if (contractAmount == null) {
			if (other.contractAmount != null)
				return false;
		} else if (!contractAmount.equals( other.contractAmount ))
			return false;
		if (contractBackSchedule == null) {
			if (other.contractBackSchedule != null)
				return false;
		} else if (!contractBackSchedule.equals( other.contractBackSchedule ))
			return false;
		if (contractBackStatus == null) {
			if (other.contractBackStatus != null)
				return false;
		} else if (!contractBackStatus.equals( other.contractBackStatus ))
			return false;
		if (contractBackTax == null) {
			if (other.contractBackTax != null)
				return false;
		} else if (!contractBackTax.equals( other.contractBackTax ))
			return false;
		if (contractId == null) {
			if (other.contractId != null)
				return false;
		} else if (!contractId.equals( other.contractId ))
			return false;
		if (contractName == null) {
			if (other.contractName != null)
				return false;
		} else if (!contractName.equals( other.contractName ))
			return false;
		if (contractNo == null) {
			if (other.contractNo != null)
				return false;
		} else if (!contractNo.equals( other.contractNo ))
			return false;
		if (contractScansFileUrl == null) {
			if (other.contractScansFileUrl != null)
				return false;
		} else if (!contractScansFileUrl.equals( other.contractScansFileUrl ))
			return false;
		if (contractType == null) {
			if (other.contractType != null)
				return false;
		} else if (!contractType.equals( other.contractType ))
			return false;
		if (contractValidity == null) {
			if (other.contractValidity != null)
				return false;
		} else if (!contractValidity.equals( other.contractValidity ))
			return false;
		if (createDate == null) {
			if (other.createDate != null)
				return false;
		} else if (!createDate.equals( other.createDate ))
			return false;
		if (jfInstitutionId == null) {
			if (other.jfInstitutionId != null)
				return false;
		} else if (!jfInstitutionId.equals( other.jfInstitutionId ))
			return false;
		if (jfInstitutionName == null) {
			if (other.jfInstitutionName != null)
				return false;
		} else if (!jfInstitutionName.equals( other.jfInstitutionName ))
			return false;
		if (jfUserId == null) {
			if (other.jfUserId != null)
				return false;
		} else if (!jfUserId.equals( other.jfUserId ))
			return false;
		if (receiptAddress == null) {
			if (other.receiptAddress != null)
				return false;
		} else if (!receiptAddress.equals( other.receiptAddress ))
			return false;
		if (receiptPostCode == null) {
			if (other.receiptPostCode != null)
				return false;
		} else if (!receiptPostCode.equals( other.receiptPostCode ))
			return false;
		if (remarks == null) {
			if (other.remarks != null)
				return false;
		} else if (!remarks.equals( other.remarks ))
			return false;
		if (updateDate == null) {
			if (other.updateDate != null)
				return false;
		} else if (!updateDate.equals( other.updateDate ))
			return false;
		if (yfInstitutionId == null) {
			if (other.yfInstitutionId != null)
				return false;
		} else if (!yfInstitutionId.equals( other.yfInstitutionId ))
			return false;
		if (yfInstitutionName == null) {
			if (other.yfInstitutionName != null)
				return false;
		} else if (!yfInstitutionName.equals( other.yfInstitutionName ))
			return false;
		if (yfUserId == null) {
			if (other.yfUserId != null)
				return false;
		} else if (!yfUserId.equals( other.yfUserId ))
			return false;
		return true;
	}

	public Contract() {
		super();
	}

	public Contract(String contractId, String contractNo, String contractName, String contractAmount, String contractValidity,
			Integer contractBackStatus, String contractBackSchedule, String jfInstitutionId, String jfInstitutionName, String jfUserId,
			String yfInstitutionId, String yfInstitutionName, String yfUserId, Date createDate, String contractScansFileUrl, Date updateDate,
			String remarks, String consigneeName, String consigneeEmail, String consigneePhone, String receiptPostCode, String receiptAddress,
			Integer contractType, String contractBackTax) {
		super();
		this.contractId = contractId;
		this.contractNo = contractNo;
		this.contractName = contractName;
		this.contractAmount = contractAmount;
		this.contractValidity = contractValidity;
		this.contractBackStatus = contractBackStatus;
		this.contractBackSchedule = contractBackSchedule;
		this.jfInstitutionId = jfInstitutionId;
		this.jfInstitutionName = jfInstitutionName;
		this.jfUserId = jfUserId;
		this.yfInstitutionId = yfInstitutionId;
		this.yfInstitutionName = yfInstitutionName;
		this.yfUserId = yfUserId;
		this.createDate = createDate;
		this.contractScansFileUrl = contractScansFileUrl;
		this.updateDate = updateDate;
		this.remarks = remarks;
		this.consigneeName = consigneeName;
		this.consigneeEmail = consigneeEmail;
		this.consigneePhone = consigneePhone;
		this.receiptPostCode = receiptPostCode;
		this.receiptAddress = receiptAddress;
		this.contractType = contractType;
		this.contractBackTax = contractBackTax;
	}

	@Override
	public String toString() {
		return "Contract [contractId=" + contractId + ", contractNo=" + contractNo + ", contractName=" + contractName + ", contractAmount="
				+ contractAmount + ", contractValidity=" + contractValidity + ", contractBackStatus=" + contractBackStatus + ", contractBackSchedule="
				+ contractBackSchedule + ", jfInstitutionId=" + jfInstitutionId + ", jfInstitutionName=" + jfInstitutionName + ", jfUserId="
				+ jfUserId + ", yfInstitutionId=" + yfInstitutionId + ", yfInstitutionName=" + yfInstitutionName + ", yfUserId=" + yfUserId
				+ ", createDate=" + createDate + ", contractScansFileUrl=" + contractScansFileUrl + ", updateDate=" + updateDate + ", remarks="
				+ remarks + ", consigneeName=" + consigneeName + ", consigneeEmail=" + consigneeEmail + ", consigneePhone=" + consigneePhone
				+ ", receiptPostCode=" + receiptPostCode + ", receiptAddress=" + receiptAddress + ", contractType=" + contractType
				+ ", contractBackTax=" + contractBackTax + "]";
	}
}